<template>
<div class="goods">
  <goods-list-item v-for="(item,index) of goods" :key="index" :goods-item="item"/>
</div>
</template>

<script>
import GoodsListItem from "@/components/content/goods/GoodsListItem";
export default {
name: "GoodsList",
  components:{
  'goods-list-item':GoodsListItem
  },
  props: {
    goods:{
      default() {
        return [];
      }
    }
  }
}
</script>

<style scoped>
.goods {
  /*父组件为flex 子组件全部都会堆在一行*/
  display: flex;
  /*根据子元素宽度显示多少个*/
  flex-wrap: wrap;
  /*均分元素*/
  justify-content: space-around;

  padding: 2px;
}
</style>
